projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cad0afc
)
x86_emulate: Disable writeback if BSF/BSR are passed zero input.
author
Keir Fraser
<keir.fraser@citrix.com>
Tue, 22 Apr 2008 10:44:56 +0000
(11:44 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Tue, 22 Apr 2008 10:44:56 +0000
(11:44 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/x86_emulate/x86_emulate.c
b/xen/arch/x86/x86_emulate/x86_emulate.c
index 2b7ddeffbbac26baadfd29faacc2c9526d192e39..8d8db35820c6b6895cc827c8492ff01e1beb6d15 100644
(file)
--- a/
xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/
xen/arch/x86/x86_emulate/x86_emulate.c
@@
-3134,7
+3134,11
@@
x86_emulate(
: "=r" (dst.val), "=q" (zf)
: "r" (src.val), "1" (0) );
_regs.eflags &= ~EFLG_ZF;
- _regs.eflags |= zf ? EFLG_ZF : 0;
+ if ( zf )
+ {
+ _regs.eflags |= EFLG_ZF;
+ dst.type = OP_NONE;
+ }
break;
}
@@
-3144,7
+3148,11
@@
x86_emulate(
: "=r" (dst.val), "=q" (zf)
: "r" (src.val), "1" (0) );
_regs.eflags &= ~EFLG_ZF;
- _regs.eflags |= zf ? EFLG_ZF : 0;
+ if ( zf )
+ {
+ _regs.eflags |= EFLG_ZF;
+ dst.type = OP_NONE;
+ }
break;
}